﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;

namespace TestWebService
{
    /// <summary>
    /// Summary description for Service1
    /// </summary>
    [WebService(Namespace = "http://www.service.org/one/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    //[SoapDocumentService(ParameterStyle=SoapParameterStyle.Bare)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    //[System.Web.Script.Services.ScriptService]
    public class Service1 : System.Web.Services.WebService
    {

        [WebMethod]
        public string HelloWorld()
        {
            return "Hello World";
        }

        [WebMethod]
        public void Upload(String Value)
        {
            // Do nothing
        }

        [WebMethod]
        public String Upload2(String input, out String Upload2Result, String input2, out String AnotherResult, String input3)
        {
            Upload2Result = "Weird!";
            AnotherResult = "lknrfv";
            return "pewf";
        }

        [WebMethod]
        public int BounceInt(int integer)
        {
            return integer;
        }

        [WebMethod]
        public string BounceString(string str)
        {
            return str;
        }

        [WebMethod]
        public bool Add1(int num1, int num2, out int intresult)
        {
            intresult = num1 + num2;
            return true;
        }

        [WebMethod]
        public bool Add2(decimal intresult, decimal dec2, out decimal decresult)
        {
            decresult = intresult + dec2;
            return true;
        }

        public string Version
        {
            [WebMethod]
            get
            {
                return "1.0";
            }
            [WebMethod]
            set
            {
                
            }
        }
    }
}
